﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Anheledir.XmlDialogEditor {
  public partial class remoteOptions : Form {
    private string _server, _user, _psw;
    private int _port;

    public remoteOptions() {
      InitializeComponent();
    }

    public remoteOptions( string server, int port, string user, string psw ) {
      _server = server;
      _user = user;
      _psw = psw;
      _port = port;

      InitializeComponent();
    }

    public string getServer() {
      return textBox1.Text;
    }

    public int getPort() {
      return Convert.ToInt32( textBox2.Text );
    }
    
    public string getUser() {
      return textBox3.Text;
    }

    public string getPsw() {
      return textBox4.Text;
    }

    private void remoteOptions_Load( object sender, EventArgs e ) {
      textBox1.Text = _server;
      textBox2.Text = _port.ToString();
      textBox3.Text = _user;
      textBox4.Text = _psw;
      
      button1.Text = languages.OK;
      button2.Text = languages.Cancel;
      this.Text = languages.RemoteServerOptions;
      groupBox1.Text = languages.ConnectionProperties;
      label1.Text = languages.Servername + ":";
      label2.Text = languages.Serverport + ":";
      label3.Text = languages.Username + ":";
      label4.Text = languages.Password + ":";
    }
  }
}
